<ion-view>
    <ion-header-bar class="bar bar-dark" align-title="center">
        <div class="buttons nav-bar-left"></div>
        <h1 class="title">转账记录</h1>
        <div class="buttons nav-bar-right"></div>
    </ion-header-bar>
    <ion-content class="transaction">
        <div class="filter button-bar">
            <button class="button button-small button-dark" ng-class="{checked: filter.type=='all'}"
                    ng-click="filter.type='all'">全部</button>
            <button class="button button-small button-dark" ng-class="{checked: filter.type=='in'}"
                    ng-click="filter.type='in'">入金</button>
            <button class="button button-small button-dark" ng-class="{checked: filter.type=='out'}"
                    ng-click="filter.type='out'">出金</button>
        </div>
        <ion-scroll direction="y" style="width:100%;padding-top: 4px" has-bouncing="false" cal-height>
            <div class="list" ng-class="filter.type">
                <div class="item item-divider row">
                    <div class="col col-30">
                        转账时间
                    </div>
                    <div class="col col-30">
                        转账金额
                    </div>
                    <div class="col col-40">
                        转账结果
                    </div>
                </div>
                <div class="item row row-center" ng-repeat="(key, item)  in transfers"
                     ng-class="{'in':item.amount>0,'out':item.amount<0}">
                    <div class="col col-30">
                        {{ item.datetime / 1000000 |  date:'yyyy-MM-dd'}}
                    </div>
                    <div class="col col-30">
                        {{item.amount | number: 2}}
                    </div>
                    <div class="col col-40">
                        {{item.error_msg}}
                    </div>
                </div>
            </div>
        </ion-scroll>
    </ion-content>
</ion-view>
